package com.example.midushop.service.brand.impl;

import com.example.midushop.entity.brand.Brand_Category;
import com.example.midushop.mapper.brand.BrandCategoryMapper;
import com.example.midushop.service.brand.BrandCategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 品牌信息服务接口类
 * */
@Service
public class BrandCategoryServiceImpl implements BrandCategoryService {
    @Autowired
    BrandCategoryMapper brandCategoryMapper;
    /**
     * 根据品牌ID以及一级分类ID绑定品牌分类信息
     * @param categoryone_id 一级分类ID
     * @param brand_id 品牌ID
     * @return 返回受影响行数
     */
    @Override
    public int addBrandCategory(long categoryone_id,long brand_id) {
        return brandCategoryMapper.addBrandCategory(categoryone_id,brand_id);
    }

    @Override
    public List<Brand_Category> getBrand_Category(long categoryone_id, long brand_id) {
        return brandCategoryMapper.getBrand_Category(categoryone_id,brand_id);
    }
}
